package qq2564874169.tuaotuao.fx.json.jackson;

import  qq2564874169.tuaotuao.fx.Dynamic;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.JsonDeserializer;

import java.io.IOException;
import java.util.Map;

public class DynamicDeserializer extends JsonDeserializer<Dynamic> {
    @Override
    public Dynamic deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException {
        Map map = deserializationContext.readValue(jsonParser, Map.class);
        return new Dynamic(map);
    }
}
